import { Good, PageParams } from "../type/listTypes"
import { ResponseType } from "../type/response"
import request from "../utils/request"

enum Enum {
  fetchGoodsListAPI = "/goods/list"
}
/**
 * @description 获取商品列表分页的接口
 * 
 */
export const fetchGoodsListAPI = (pageParams: PageParams) => request.get<ResponseType<Good>>(`${Enum.fetchGoodsListAPI}/${pageParams.page}/${pageParams.limit}`, { category1Id: pageParams.category1Id, category2Id: pageParams.category2Id })